/*  1:   */ package org.jetbrains.jps.model.module.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.Ref;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsElementChildRole;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.module.JpsModule;
import org.jetbrains.jps.model.module.JpsModuleDependency;
import org.jetbrains.jps.model.module.JpsModuleReference;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */ 
/* 12:   */ public class JpsModuleDependencyImpl
/* 13:   */   extends JpsDependencyElementBase<JpsModuleDependencyImpl>
/* 14:   */   implements JpsModuleDependency
/* 15:   */ {
/* 16:31 */   private static final JpsElementChildRole<JpsModuleReference> a = JpsElementChildRoleBase.create("module reference");
/* 17:33 */   private volatile Ref<JpsModule> b = null;
/* 18:   */   
/* 19:   */   public JpsModuleDependencyImpl(JpsModuleReference paramJpsModuleReference)
/* 20:   */   {
/* 21:37 */     this.myContainer.setChild(a, paramJpsModuleReference);
/* 22:   */   }
/* 23:   */   
/* 24:   */   public JpsModuleDependencyImpl(JpsModuleDependencyImpl paramJpsModuleDependencyImpl)
/* 25:   */   {
/* 26:41 */     super(paramJpsModuleDependencyImpl);
/* 27:   */   }
/* 28:   */   
/* 29:   */   @NotNull
/* 30:   */   public JpsModuleReference getModuleReference()
/* 31:   */   {
/* 32:47 */     JpsModuleReference tmp13_10 = ((JpsModuleReference)this.myContainer.getChild(a));
/* 33:47 */     if (tmp13_10 == null) {
/* 34:47 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsModuleDependencyImpl", "getModuleReference" }));
/* 35:   */     }
/* 36:47 */     return tmp13_10;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public JpsModule getModule()
/* 40:   */   {
/* 41:52 */     Ref localRef = this.b;
/* 42:53 */     if (localRef == null)
/* 43:   */     {
/* 44:54 */       localRef = new Ref(getModuleReference().resolve());
/* 45:55 */       this.b = localRef;
/* 46:   */     }
/* 47:57 */     return (JpsModule)localRef.get();
/* 48:   */   }
/* 49:   */   
/* 50:   */   @NotNull
/* 51:   */   public JpsModuleDependencyImpl createCopy()
/* 52:   */   {
/* 53:63 */     void tmp8_5 = new JpsModuleDependencyImpl(this);
/* 54:63 */     if (tmp8_5 == null) {
/* 55:63 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsModuleDependencyImpl", "createCopy" }));
/* 56:   */     }
/* 57:63 */     return tmp8_5;
/* 58:   */   }
/* 59:   */   
/* 60:   */   public String toString()
/* 61:   */   {
/* 62:68 */     return "module dep [" + getModuleReference() + "]";
/* 63:   */   }
/* 64:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.module.impl.JpsModuleDependencyImpl

 * JD-Core Version:    0.7.0.1

 */